# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=akonadi-mime
pkgver=20.04.3
pkgrel=0
pkgdesc="Libraries and daemons to implement basic email handling"
arch="all !armhf"
url="https://community.kde.org/KDE_PIM"
license="LGPL-2.0-or-later"
depends_dev="qt5-qtbase-dev kcodecs-dev kconfigwidgets-dev kdbusaddons-dev kio-dev ki18n-dev kxmlgui-dev kmime-dev kitemmodels-dev akonadi-dev shared-mime-info libxslt-dev"
makedepends="$depends_dev extra-cmake-modules"
source="https://download.kde.org/stable/release-service/$pkgver/src/akonadi-mime-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	# mailserializerplugintest is broken
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E "mailserializerplugintest"
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="a22c8eaa5912fc2b13cf018b89062063157eb87570a9367d9fc4cabdf87e132fc564c81b21583fd0693b7ae4b2f13da6e2f7d6683a441ac2f320f594123bde0a  akonadi-mime-20.04.3.tar.xz"
